/**
 * 
 */
package de.cbf.cam.dsa.tavern.carte.ui.interfaces;

import java.awt.event.ActionListener;

import org.eclipse.swt.widgets.Shell;

import de.cbf.cam.dsa.tavern.carte.model.entities.interfaces.IEditableEntity;

/**
 * @author Stefan Alter
 *
 */
public interface ICompositeEditEntity {
	
	/**
	 * clears values if set to false
	 * @param value
	 */
	public void setEnabled(boolean value);
	
	public void setButtonSaveEnabled(boolean value);
	public void setButtonCancelEnabled(boolean value);
	
	/**
	 * writes values to UI-Elements
	 * @param value : entity with values, if null disable view
	 * @throws IllegalArgumentException, if entity set is not applicable
	 */
	public void setEntity(IEditableEntity value) throws IllegalArgumentException;
		
	public boolean registerSaveEditListener(ActionListener listener);
	public boolean deRegisterSaveEditListener(ActionListener listener);
	
	public boolean registerCancelEditListener(ActionListener listener);
	public boolean deRegisterCancelEditListener(ActionListener listener);

	public Shell getShell();

	public void clear();
}
